package com.kuaimacode.kframework.mybatis.mapper.coupon;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kuaimacode.kframework.mybatis.models.coupon.UserCoupon;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;


/**
 * @author Administrator
 * @date 2019/03/25
 */
public interface UserCouponMapper extends BaseMapper<UserCoupon> {


    List<UserCoupon> queryUsersCouponList(@Param("userCoupon") UserCoupon userCoupon);


    List queryUserCouponInfo(Long userId, String status);

    Map queryUserCouponInfoById(Long userId, String status, Long couponId, Integer useScope);


    /**
     * 给所有用户发放优惠券
     */
    void sendAllUser(@Param("userCoupon") UserCoupon userCoupon);

    List<UserCoupon> queryOrderCoupons(@Param("userId")Long userId,@Param("orderType") String orderType,@Param("childType") String childType,@Param("amount") BigDecimal amount);


}

